Configuring: .NET Wrapper Source

The .NET Wrapper Source enables integration of external .NET objects. In this way, you can add custom functionality, own code, or third party libraries and objects to your solution.

Select and configure the source object from a valid and existing library file (dll). The dataset that will be created will be determined by the configuration of this object.

Worked example: .NET Wrapper Source

Steps to configure

  1. Select the source object: Select the source object from the .dll file. Some examples of .dll files are included for your use.

  2. Configure object: Configure the source object for use in preparing data.

  3. Select output fields: Select the output fields that will be used.

  4. Select timestamp for output: Select the required method of determining the timestamp (for continuous sources only).

  5. Select index for output: Select the required method of determining the index (for discrete sources only).

  6. Select quality for output: Select to show the quality or not, and how the quality will be shown.

  7. Execute: A new dataset will be created based on the configurations of the source.

Step 1: Select the source object

Select the source object which is a valid .dll file from the correct folder location: the same install directory as the Troubleshooter.  Some examples of .dll files are included in this install directory.

  • The source object can either use continuous or discrete data. This determines whether the timestamp page (if continuous source chosen) or index page (if discrete source chosen) will be displayed later for configuration.

  • Select the correct source from the populated drop down list.

  • The output window at the bottom of the page will indicate whether loading was successful or not.  It will also give you reasons as to why an upload was unsuccessful.  

  • Default: No .dll file loaded, and therefore all other options on the page will be disabled.

  • Minimum configuration: A valid dll (library file) has to be loaded with valid source objects.

Step 2: Configure object

Configure the object in terms of the selected .NET source object (continuous or discrete). Different source objects have different configuration requirements. The configuration described below is for the example .dll files:

Example 1: Random generator (both continuous and discrete objects)

  • This will generate a dataset of random values.

  • Configure the following:

    • seed value

      • this value determines which random dataset will be generated

      • using the same seed value on each configuration will ensure that the same random values are generated for each dataset

      • a seed value of 0 will randomly choose a seed value, so that a random dataset is generated

    • execution period

    • execution mode

      • select whether to use historical or real-time data

      • if using historical data, define the data window and total number of samples required

    • any number of fields

      • use any of the available field types

      • click on the data type buttons below the field window

      • you will be prompted to configure the fields required

      • enter a name for each of the selected fields (which will be appended if you want to add more than one)

      • for a string field, enter an expression that will determine how the values will be generated

      • for an integer and a double field, define the value range

  • Default:

    • Seed value of 0 and execution period of 1.

    • Historical execution mode is selected, with the current date

    • No fields are added.

  • Minimum configuration: At least one field must be added. The total number of samples must also be > 0.

Example 2: Sine generator (both continuous and discrete objects)

  • This will generate a dataset of values representing a sine wave.

  • Configure the wave period, frequency, amplitude, Y offset, execution period, execution mode and wave type.

  • Default:

    • Period of 10 seconds, 1 amplitude and an Y offset of 0 is selected.

    • Historical execution mode is selected with the current date being displayed.

    • Sine is the selected wave type.

Example 3: Discrete source combiner (discrete objects only)

  • Select a source from the drop down menu, and [Add source].

  • Configure the source as per the [properties] and [select] tabs.

  • On the select tab, highlight the selected field and convert the data type if required.

  • Default: No configuration completed.

  • Minimum configuration for this step: The configuration must pass the runnability check.

Runnability Check

The [Next] button will always be enabled unless the object has not been configured correctly. If so, then when clicking [Next], errors will show on the page. Click [Previous] to rectify the listed errors.

Step 3: Select output fields

Select the fields that you want to import. These are the fields that will be written to the new dataset.

  • Default: Fields are placed in the available window.

  • Minimum configuration: At least one field must be selected.

Step 4: Select timestamp for output

Select the timestamp of the dataset.

  • You have the option to create a timestamp or not to use one.

  • Create timestamp: you can either create a master timestamp or one for each field (provided that there is enough space in the dataset).

  • Timestamp alignment allows you to align the values according to the timestamps in chronological order. If there is no value for the field at a specific timestamp, it maintains the previous value.

  • If you are able to configure this step, you have a continuous object, and the next step [Set Index] will be skipped.

  • Default: [No Timestamps] is selected.

  • Minimum configuration: At least one option must be selected.

Step 5: Select index for output

Select the index to be used for your dataset.

  • This configuration is only for discrete objects, in which case the Set Timestamp step will have been skipped.

  • The [Create new index] option creates the index from the object.

  • Default: [No index] is selected.

  • Minimum configuration: At least one option must be selected.

Step 6: Select quality for output

Select to way in which to view the data quality.

  • Set bad quality to null: all the bad quality values of the various fields will receive null values.

  • Create Quality: this will create a master quality field and/or create a quality field for each field (providing that there is enough space in the dataset).

  • Default: The [No quality] option is selected.

  • Minimum configuration: At least one option must be selected.

Step 7: Execute

A dataset will be created, based on the configuration of the source object. All the fields that you selected will be included in the dataset alongside the selected timestamp/index and quality fields.


Related topics:

  

CSense 2023- Last updated: June 24,2025